//
//  BSSettingTableViewCell.m
//  BS
//
//  Created by 王浩宇 on 15/8/20.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "BSSettingTableViewCell.h"

@implementation BSSettingTableViewCell

//- (void)loadThemeImage
//{
//    self.backgroundColor = [[ThemeManager shareInstance] getColorWithName:@"bgColor"];
//    _settingTextLabel.textColor = [[ThemeManager shareInstance] getColorWithName:@"default"];
//    _restTextLabel.textColor = [[ThemeManager shareInstance] getColorWithName:@"default"];
//}

- (void)awakeFromNib {
    // Initialization code
//    [self loadThemeImage];
//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loadThemeImage) name:kThemeDidChangeNotification object:nil];
}
- (IBAction)settingNightMode:(id)sender {
//            if ([sender tag] == 10) {
//                NSString *themeName = [ThemeManager shareInstance].themeName;
//            if ([themeName isEqualToString:@"默认"])
//                {
//                    themeName = @"nt";
//                }
//                else
//                {
//                    themeName = @"默认";
//                }
//                
//                [ThemeManager shareInstance].themeName = themeName;
//                
//                [[NSNotificationCenter defaultCenter] postNotificationName:kThemeDidChangeNotification object:nil];
//                
//                [[NSUserDefaults standardUserDefaults] setObject:themeName forKey:kThemeName];
//                [[NSUserDefaults standardUserDefaults] synchronize];
//
//            }else{
//                NSLog(@"sf");
//            }

}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

//     Configure the view for the selected state
}

- (IBAction)fontSizeSeg:(UISegmentedControl *)sender {
    UIFontDescriptor *scriptFontDescriptor = [UIFontDescriptor fontDescriptorWithFontAttributes:                                                       @{UIFontDescriptorFamilyAttribute: @"Zapfino",                                                         UIFontDescriptorSizeAttribute: @15.0}                                           ]; self.fontSize.font = [UIFont fontWithDescriptor:scriptFontDescriptor size:0.0];

    if (sender.selectedSegmentIndex == 0) {
        NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
        NSNotification *cation = [[NSNotification alloc] initWithName:@"小字体" object:@(10.0) userInfo:nil];
        [center postNotification:cation];
        NSLog(@"wang");
    }else if (sender.selectedSegmentIndex == 1){
        NSLog(@"hao");
    }else{
        NSLog(@"yu");
    }
}
@end
